﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ThreeObject.ERP.Model.Xiao;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;

namespace ThreeObject.ERP.Xiao
{
    public class CustomersServices :ApplicationService,ICustomerServices
    {
        private readonly IRepository<Customer,int> _customerRepository;

        public CustomersServices(IRepository<Customer, int> customerRepository)
        {
            _customerRepository = customerRepository;
        }

        public int AddCustomer(Customer customers)
        {
            var result =  _customerRepository.InsertAsync(customers);
            return result == null ? 1 : 0;

        }
    }
}
